Automatic image quality evaluation and correction technique for digitized and thresholded document images

ABSTRACT

A process and system for automating the image quality inspection and correction for scanned document which previously required a human operator. For every scanned and thresholded image, the process and system performs an automatic evaluation through a binary image quality detection system which generates an image noise index indicative of the amount of image artifacts or image loss. When a poor quality scanned page is detected, for example, too much speckle noise, the gray scale image is retrieved or the image is rescanned. The gray scale image then automatically undergoes an image quality correction process to produce a clean, readable binary image.

FIELD OF THE INVENTION

[0001] The invention relates to a process and system for automating the image quality inspection and correction for scanned documents which previously required a human operator. The process and system for each and every scanned and thresholded image performs an automatic evaluation through a binary image quality detection system which generates an image noise index indicative of the amount of image artifacts or image loss. When a poor quality scanned page is detected, e.g., too much speckle noise is present, the gray scale image is retrieved or the image is rescanned in gray scale. The gray scale image then automatically undergoes an image quality correction process to produce a clean, readable binary image.

BACKGROUND OF THE INVENTION

[0002] In a production scanning environment, the digital output of a scanned paper document is often represented and stored in binary (Black and White) form because of greater efficiency in storage and transmission, particularly for textual images. The capture of a binary image requires an image thresholding process installed in a scanner, which converts digital gray scale signals captured by a CCD sensor (usually, 8 bits per pixel) into binary signals (1 bit per pixel). Since an image thresholding is an image data reduction process, it often results in unwanted image artifacts or image information loss, such as speckle noises in the document background or loss of low contrast characters. In the prior art, there are numerous adaptive thresholding techniques for producing an optimal quality binary image. However, an adaptive thresholding technique has yet to be found that automatically produces a clean, readable binary image for every captured gray scale image in a batch of paper documents due to variations of paper background and content. As a result, the production document scanning often requires intensive labor in the form of visual image quality inspection warranting that every captured binary image is readable.

[0003] Clearly, there is a need for an improved scanning system and process that is capable of producing a clean, readable binary image of text or the like without the need for a visual image quality inspection. Ideally, such a system and process would be sufficiently compatible with presently available scanning components to allow the use of the system on scanners presently in use, and to minimize the need for the design and manufacture of new components.

SUMMARY OF THE INVENTION

[0004] The invention is an image processing system and process that automates the image quality inspection and correction previously performed by a human operator. The image quality of every scanned and thresholded image is automatically evaluated by a binary image quality detection system that generates an image noise index for every image. When the image noise index indicates a poor image, such as too much speckle noise in background, the gray scale image is retrieved or the document is re-scanned in gray scale. An image quality correction process is automatically applied to the gray scale image to produce a corrected, clean, and readable binary image.

[0005] It is an object of the present invention to automatically index image noise level for a thresholded image which is generated by a multi-windowing technique for thresholding an image using local image properties in real time. For every thresholded image having high image noise index, an image quality correction scheme is applied to the problematic document and produces an optimal binary image quality in post processing. The design of the system allows performing high speed image quality inspection while retaining optimal image quality output without operational interruption in high speed document scanning environment.

[0006] The image processing system comprises two image processing components: a binary image quality inspection component for evaluation of image noise level and a multiple adaptive thresholding image processing component for correction of image quality. The binary image quality inspection component evaluates the noise level of a thresholded image and takes the noise level as an index of image quality. When the noise level is greater than a specified threshold the image is considered as poor image quality. For every poor thresholded image, its original gray scale image is retrieved if available, otherwise the original document is recaptured in gray scale. The correction of image quality is made by feeding the gray scale image into a multiple adaptive thresholding processor. The multiple adaptive thresholding technique comprises two iterative image processing steps: adaptive image thresholding and binary image analysis. The iteration proceeds until an optimal binary image is found. An optimal binary image means an image having clean background and readable text.

[0007] The invention and its objects and advantages will become more apparent in the detailed description of the preferred embodiment presented below.

BRIEF DESCRIPTION OF THE DRAWINGS

[0008]FIG. 1 shows the block diagram of the image processing for automatic image quality inspection and correction in a scanning system.

[0009]FIG. 2 shows the block diagram of the Multi-windowing technique for thresholding an image using local image properties.

[0010]FIG. 2A illustrates the image quality of a thresholded image controlled by the input threshold parameters (contrast threshold (CT), intensity threshold (IT)).

[0011]FIG. 2B illustrates the relationship of the two input parameters (contrast threshold, intensity threshold) and the sensitivity of thresholding.

[0012]FIG. 3 shows the image processing steps of automatic image quality inspection for a bitone image.

[0013]FIG. 3A shows the neighborhood operation of binary image dilation.

[0014]FIG. 3B is an example of noise dot structures before image dilation in a binary image.

[0015]FIG. 3C is the noise dot structures of FIG. 3B after image dilation.

[0016]FIG. 3D is the image processing block diagram of noise feature extraction.

[0017]FIG. 3E is an example of noise feature calculation in a binary image.

[0018]FIG. 4 shows the block diagram of the image processing for automatic image quality correction.

[0019]FIG. 4A shows the block diagram of the image processing for the multiple adaptive image thresholding.

[0020]FIG. 4B is the table containing the calculated noise levels for different thresholded images produced by various input parameters (contrast threshold (GT), intensity threshold (IT)).

[0021]FIG. 4C is a flow chart of noise level analysis in finding the optimal contrast threshold and intensity threshold.

[0022]FIG. 4D is the first example of noise index distribution (R(GT,IT)) with constant intensity threshold (IT) at 70 and multiple contrast thresholds (GT) varied from 60 to 15.

[0023]FIG. 4E is the second example of noise index distribution (R(GT,IT)) with constant intensity threshold (IT) at 70 and multiple contrast thresholds (GT) varied from 60 to 15.

[0024]FIG. 4F is the third example of noise index distribution (R(GT,IT)) with constant intensity threshold (IT) at 70 and multiple contrast thresholds (GT) varied from 60 to 15.

[0025]FIG. 4G is an example of noise index distribution (R(GT,IT)) with constant intensity threshold (IT) at 60 and multiple contrast thresholds (GT) varied from 70 to 220.

[0026]FIG. 4H is an example of noise index distribution (R(GT,IT)) with constant intensity threshold (IT) at 60 and multiple contrast thresholds (GT) varied from 70 to 220.

DETAILED DESCRIPTION OF THE INVENTION

[0027]FIG. 1 depicts the block diagram of a digital image processing system which automatically inspects the image quality of every thresholded image. For a poor thresholded image obtained from the image quality inspection, an image quality correction process is then initiated to search for optimal threshold parameters in order to obtain a legible and clean binary image. The image processing system comprises the following steps: (1) a paper document is digitally captured in gray scale which typically contain 8 bits per pixel; (2) the capture gray scale image (G) is fed through an adaptive image thresholding module to convert the gray scale image into a binary image (B); (3) the binary image is run through an image quality inspection and an image noise index (INI) is generated from the inspection; (4) the INI value determines the level of image quality, and the image quality is classified as poor when the INI value is greater than a predetermined threshold (ITH); (5) for a low quality image, an image quality correction is applied to the gray scale image in order to produce a legible, clean binary image. The detail of each image processing module is described in the following:

[0028] Adaptive Image Threshold

[0029] The multi-windowing technique for thresholding an image using local image properties as described in U.S. Pat. No. 5,583,659, the disclosure of which is hereby incorporated by reference, is applied to convert a gray scale image into a binary image. The thresholding technique calculates the threshold value for every pixel in an image based on the local image properties surrounding the pixel. The threshold value is then applied to turn the gray value of a pixel into bi-level value (black or white). The block diagram of the thresholding technique is summarized in FIG. 2. The operation of the technique requires a user to supply a contrast threshold value (CT) and an intensity threshold value (IT) as shown in FIG. 2A. The image quality of a thresholded image is determined by the input of the two threshold values (CT and IT). A thresholded image (CT, IT) as shown in FIG. 2A means that the image quality of a thresholded image is a function of (CT, IT). The image quality of a thresholded image is evaluated by two factors: text readability (no image information loss) and smoothness of the white background (noise free on image background). The CT value controls the sensitivity of detecting thin, light text and line arts, and the it value accounts for the threshold of a uniform gray region. Assume that the CT value is normalized to the values in the range of 0 and 100 and the it value is between 0 and 255 as shown in FIG. 2B. The CT value is often chosen to be sensitive enough for extracting all image information such as light text, thin lines, . . . etc., and the IT value is set to turn light gray uniform region into white background. The threshold values at (CT=60, IT=90) as shown in FIG. 2B is considered as an appropriate setup to extract all image information details. However, the setup of the threshold values at (CT=60, IT=90) may result in too sensitive for some documents due to the roughness of document papers and results in generating unwanted speckle noises in background of the thresholded images. The following section describes the method of automatic image noise inspection.

[0030] Automatic Image Noise Inspection

[0031] As mentioned above, the CT value supplied to the thresholding technique is always set to be sensitive enough to extract all image information details so that the text readability is no longer an issue to be concerned in image quality evaluation. The evaluation of image quality is simplified to the detection of background noises in the thresholded image.

[0032]FIG. 3 is the processing steps of detecting noise level for a thresholded image. A binary image dilation operation is applied to the binary image (B) and generates a new binary image (B1). Three noise features are measured from the dilated binary image (B1). The normalized noise area (R) is taken as the image noise index (IM) of the binary image (B). The detailed description of the processing steps as shown in FIG. 3 is stated in the following.

[0033] Assume that black pixel is marked with “1” and white pixel is marked with “0” in a binary image. The image dilation operation is to expand the region of black dots by a local neighborhood operation as shown in FIG. 3A. The center pixel “o” at the output is set to “0” only when all neighboring pixel X_(I) in a 3×3 window, where I=1, . . . 8, are matched with the 3×3 zero mask. Otherwise, the center pixel “o” at the output is marked with black pixel, “1”. The dilation operation is required because in some documents the text is printed with dot-matrix. The dilation operation connects the adjacent small dots into line segments so that the noise dots and the dots belonging to dot-matrix characters becomes distinguishable. A graphical example is illustrated in FIG. 3B and FIG. 3C. FIG. 3B displays a binary image before image dilation. The number and size of the black dots in the left-handed side of the image is identical to the one in the right-handed side. If the number (or the area) of the noise dots is taken as a feature to evaluate level of noise, the feature will fail to differentiate the image patterns in both sides. However, after image dilation is applied, the original dotted pattern is turned into two straight line segments in the left-handed side as shown in FIG. 3C. The dispersed noise patterns in the right handed side of the image stays the same except the enlarged noise dots. Hence, the number of noise dots becomes a useful feature in extracting real noise dots in the evaluation of noise level in the dilated binary image.

[0034] The randomly, distributed small dots which contain no image information in a binary image are defined as noise. The noise measurement requires counting the number and the area of the small dots in a binary image. FIG. 3D depicts the processing steps of noise measurement on the dilated binary image. First, it applies to a contour tracing method (see reference in U.S. Pat. No. 5,974,199, the disclosure of which is hereby incorporated by reference) to extract the outline of every object in the dilated binary image. The contour pixels are extracted either in a sequence of clockwise or counterclockwise. The contours extracted in the order of clockwise are the outer contour (or black object contours), and the contours extracted in the order of counterclockwise are the inner contours (or white object contours). A size threshold (T_(s)) is applied to reject the large contour components whose size is too large to be considered as noise dots. The numbers of the remaining small contours are counted for black noise dots (NB) and white noise dots (NW), respectively, and the total noise area (NA) for black noise dots is calculated. The normalized noise area (R) is the ratio of NA value over the document area (DA) and is taken as the image noise index (INI). The NB and NW values are used to differentiate the white background from the black background. When the NB is greater than the NW, it indicates that the image has a white background. A large NW value then indicates that the background is black. This occurs when there is a con-tone image or large dark gray area existed in the document. FIG. 3E is an example of the calculation of noise features. There are 20 black noise dots counted. That is that NB equals to 20. The number of white noise dots (NW) is counted as 10. Assume that the average area of each noise is calculated as Na, then the total noise area (NA) is 20 times Na and the image noise index (INI) is equal to NA/DA.

[0035] The image noise index (INI) is used to judge the noise level of a binary image. When the INI value is below a specified threshold (ITH), the image is considered as good binary image. That means the binary image is legible and the background is clean. When it is greater than the ITH, it is classified as a noise binary image. The document is required to rescan or the gray scale image is retrieved if available for automatic image quality correction.

[0036] Automatic Image Quality Correction

[0037]FIG. 4 shows the block diagram of image processing for automatic image quality correction. A multiple adaptive image thresholding process is applied to produce (N+M) binary images by orderly change of the N different contrast and the M different intensity threshold parameters. The noise level of every binary image in the (N+M) thresholded image is calculated, respectively. The optimal threshold parameters is obtained from the (N+M) pair of threshold values by analyzing the correlation of the (N+M) noise levels and the (N+M) pairs of contrast and intensity thresholds.

[0038] The basic processing steps of the multiple adaptive thresholding are the same as the one in FIG. 2 except with the multiple input of threshold values (CT, IT). The input (CT, IT) values are changed with 5 units decrement of CT and 30 units increment of IT in order of (60,70), (55,70), (50,70), (45,70), (40,70), (35,70), (30,70), (25,70), (20,70), (15,70), (60,100), (60,130), (60,160), (60,190) and (60,220). The 15 pairs of threshold values are fed into the adaptive thresholding process sequentially and generate 15 different binary images. By applying the process of noise feature extraction to the 15 different images separately as shown in FIG. 3, there are 15 noise values, R(CT,IT), calculated and listed in FIG. 4B.

[0039] The objective of correlation analysis of noise and (CT,IT) is to identify the threshold values (CT,IT) which will be used in the adaptive thresholding process in generating least background noises while retaining all image information in a thresholded image. FIG. 4C is the block diagram of the data analysis of selecting the optimal threshold values. First, scanning through the set of noise values, R(CT(I),70), where I=1, . . . , 10, if the condition (A): R(CT(I),70)>Rth for all CT(I), is met, where the Rth is a predefined noise threshold value (Rth) as shown in FIG. 4D. This indicates that the noise levels of all thresholded images are high and unrelated to the change of contrast threshold. Hence, it requires the change of intensity threshold (IT) in search of the optimal intensity threshold. On the other hand, if the condition (A) fails, it requires the change of the contrast threshold (CT) in search of the optimal contrast threshold.

[0040] In the search of optimal contrast threshold, if all of the noise values, R(CT(I),70), I=1, . . . , 10, are smaller than the noise threshold (Rth) as shown in FIG. 4D, it indicates that the starting threshold setting at (CT,IT)=(60,70) generates little background noises and the final threshold values (CTF,ITF)=(60,70) are taken as the optimal threshold values. Otherwise, by examining the array of R(CT(I), 70) data, if the condition (B): R(CT(I), 70)>R(CT(I+1), 70), I−1, . . . , 9, is satisfied, the final threshold values (CTF,ITF)=(CT(I), 70) is selected at where the CT(I) meets the condition: R(CT(I), 70)<Rth and R(CT(I+1), 70)>Rth. As the example shown in FIG. 4E, the CT(I) value is selected at 35 and the final threshold values (CTF,ITF)=(35, 70). If the test of the condition (B) fails, the final threshold values (CTF,ITF)=(CT(I), 70) is selected at where the CT(I) meets the condition: R(CT(I), 70)<R(CT(I−1), 70). As the example shown in FIG. 4F, the CT(I) value is selected at 40 and the final threshold values (CTF,ITF)=(40, 70).

[0041] In the search of optimal intensity threshold, if the condition (C): R(60,IT(J))>Rth for all IT(J),J=1, . . . , 6, is met, it indicates that the noise levels of all thresholded images are high and unrelated to the change of intensity threshold as the example shown in FIG. 4G. The final threshold values (CTF,ITF) is set at (60, 70) which is the starting setup. This implies that there is no optimal threshold values detected and the final threshold values are assigned with the starting setting, (CTF,ITF)=(60, 70). On the other hand, if the test of the condition (C) fails, the (CTF,ITF)=(60,IT(J)) is selected at where R(60, IT(J−1))>Rth and R(60, IT(J))<Rth. As the example shown in FIG. 4H, the IT(J) value is selected at 130. This indicates the intensity threshold at IT(J−1)=100 is close to the background intensity and it is incapable of thresholding the intensity levels of background pixels and results in generating large amount of background noises.

[0042] The invention has been described in detail with particular reference to certain preferred embodiments thereof, but it will be understood that variations and modifications can be effected within the scope of the invention. 

What is claimed is:
 1. An imaging process for producing a clean, readable binary image of a scanned document comprising the steps of: a. digitally capturing a document as a gray scale image; b. performing an image adaptive thresholding process to convert the gray scale image into a binary image; c. inspecting the binary image to create an image noise index value indicative of the amount of undesirable image artifacts or image information loss; d. determining whether the image noise index is equal to or greater than a predetermined threshold value; and e. performing an image correction process to produce a readable, clean binary image when said image noise index value is determined to be equal to or smaller than said threshold value.
 2. An imaging process for producing a clean, readable binary image as set forth in claim 1, wherein the image correction process comprises digitally capturing the document as a new gray scale image followed by repeating steps b.)-e.) until the image noise index value falls below the predetermined threshold value.
 3. An imaging process for producing a clean, readable binary image as set forth in claim 1, further comprising the step of storing the gray scale image and the image correction process comprises retrieving the gray scale image from storage followed by repeating steps b.)-e.) until the image noise index value falls below the predetermined threshold value.
 4. An imaging process for producing a clean, readable binary image as set forth in claim 1, wherein the step of determining comprises comparing the image noise index for an image with a predetermined threshold value selected to generate the least background noise while retaining all the image information on the gray scale image wherein when the image noise index value is at or above the predetermined threshold value the gray scale image is determined to be a noisy binary image requiring correction
 5. An imaging system for producing a clean, readable binary image of a scanned document comprising: a. means for digitally capturing a document as a gray scale image; b. means for performing an image adaptive thresholding process to convert the gray scale image into a binary image; c. inspection means for the binary image to create an image noise index value indicative of the amount of undesirable image artifacts or image information loss; d. processing means for comparing the image noise index for an image with a predetermined threshold value; and e. processing means for performing an image correction process to produce a readable, clean binary image when the image noise index is equal to or greater than the predetermined threshold value.
 6. An imaging system for producing a clean, readable binary image as set forth in claim 5, wherein the processing means for image correction comprises a means to digitally capture the document as a new gray scale image and means for repeating the inspection and correction of the image by the means b.)-e.) until the image noise index value falls below the predetermined threshold value.
 7. An imaging system for producing a clean, readable binary image as set forth in claim 5, further including means to store the gray scale image and wherein the processing means for image correction comprises means for retrieving the gray scale image from storage and means for repeating the inspection and correction of the image by the means b.)-e.) until the image noise index value falls below the predetermined threshold value.
 8. An imaging system for producing a clean, readable binary image as set forth in claim 5, wherein the processing means for comparing the noise index comprises means for comparing the image noise index for an image with a predetermined threshold value selected to generate the least background noise while retaining all the image information on the gray scale image wherein when the image noise index value is at or above the predetermined threshold value the gray scale image is determined to be a noisy binary image requiring correction. 